﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace InfonavaEye.util
{
    public class ImageUtils
    {
        /// <summary>
        /// 图片翻转180度
        /// </summary>
        /// <param name="input"></param>
        /// <param name="output"></param>
        public static void RotateAndSaveImage(String input, String output)
        {
            //create an object that we can use to examine an image file
            using (Image img = Image.FromFile(input))
            {
                //rotate the picture by 90 degrees and re-save the picture as a Jpeg
                img.RotateFlip(RotateFlipType.Rotate180FlipNone);
                img.Save(output, System.Drawing.Imaging.ImageFormat.Jpeg);
            }
        }


    }
}
